package xcraft.xserver;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.sun.jersey.spi.inject.Inject;

@Path("/")
public class TestResource extends ResourceBase {
	
	
	@Inject
	PlanetService planetService;
	
	@GET
    @Path("/test")
    @Produces(MediaType.APPLICATION_JSON)
	public String doTest() {
		return "Test Ok asd asd asd as";
	}
	
	@GET
    @Path("/create/{id}")
    @Produces(MediaType.APPLICATION_JSON)
	public String createPlanet(@PathParam("id") String id) {
		 String json = getJSON(planetService.createPlanet(id));
		return json;
	}
}
